
import 'package:Flutter_Demo/ui/pages/home/home_drawer_content.dart';
import 'package:Flutter_Demo/ui/pages/main/initialize_items.dart';
import 'package:flutter/material.dart';

class MYMainScreen extends StatefulWidget {
  static const String routeName = "/";

  @override
  _MYMainScreenState createState() => _MYMainScreenState();
}

class _MYMainScreenState extends State<MYMainScreen> {

  int _currentIndex = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      drawer: Container(
        width: 250,
        child: Drawer(
          child: MYHomeDrawerContent(),
        )
      ),
      body: IndexedStack(
        children: pages,
        index: _currentIndex,
      ),
      bottomNavigationBar: BottomNavigationBar(
        // 字体不变
        selectedFontSize: 14,
        unselectedFontSize: 14,
        // 没有点击效果
        type: BottomNavigationBarType.fixed,
        items: items,
        currentIndex: _currentIndex,
        onTap: (index) {
          setState(() {
            _currentIndex = index;
          });
        },
      ),
    );
  }
}




















